//
//  SmartDeviceViewCell.m
//  SenMo
//
//  Created by ZengYuan on 15/12/15.
//  Copyright © 2015年 ZengYuan. All rights reserved.
//

#import "SmartDeviceViewCell.h"

@implementation SmartDeviceViewCell

- (void)awakeFromNib {
    // Initialization code
    self.channelCountLabel.layer.cornerRadius=3;
    self.channelCountLabel.layer.masksToBounds=YES;

    self.userCountLabel.layer.cornerRadius=3;
    self.userCountLabel.layer.masksToBounds=YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

+ (instancetype)cellWithTableView:(UITableView *)tableView{

    static NSString *ID = @"sdvc_id";
    SmartDeviceViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    
    if (cell == nil) {
        cell=[[[NSBundle mainBundle] loadNibNamed:@"SmartDeviceViewCell" owner:self options:nil] objectAtIndex:0];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.backgroundColor = [UIColor whiteColor];
    }

    return cell;
}
- (IBAction)tapSet:(id)sender {
    self.tapBlock();
}

@end
